﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Common.DataAnnotations
{
    /// <summary>
    /// 手机号
    /// </summary>
    public class MobileAttribute : RegularExpressionAttribute
    {
        const string MobilePattern = @"^1[3456789]{1}\d{9}$";
        /// <summary>
        /// 
        /// </summary>
        public MobileAttribute() : base(MobilePattern)
        {
            ErrorMessage = "{0}格式不正确";
        }
    }
}
